package sg.edu.nus.iss.billing.gui.subscription;

import javax.swing.JPanel;

import sg.edu.nus.iss.billing.entity.RecordState;
import sg.edu.nus.iss.billing.entity.service.CableTVService;
import sg.edu.nus.iss.billing.entity.service.DigitalVoiceService;
import sg.edu.nus.iss.billing.entity.service.MobileVoiceService;


/**
 * 
 * @author RAJU NAVANEETHAM VENKATESHWARI
 *
 */
public class ViewSubscriptionPanel extends TabSubscriptionPanel {
	
	private static final long serialVersionUID = 5916374397102833973L;

	
	public ViewSubscriptionPanel() {
		super();
	}
	

	@Override
	public SubcriptionPanel createMobilePlanPanel() {
		SubcriptionPanel panel = null;
		if(isSubscribeMobile() && cust.getActive() == RecordState.ACTIVE){
			panel = new SubcriptionPanel(accNo, new MobileVoiceService(), true);
			
		}
		return panel;
	}

	@Override
	public SubcriptionPanel createDigitalPlanPanel() {
		SubcriptionPanel panel = null;
		if(isSubscribeDigitalVoice() && cust.getActive() == RecordState.ACTIVE){
			panel = new SubcriptionPanel(accNo, new DigitalVoiceService(), true);
			
		}
		return panel;
	}

	@Override
	public SubcriptionPanel creaetCablePlanPanel() {
		SubcriptionPanel panel = null;
		if(isSubscribeCableTV()){
			panel = new SubcriptionPanel(accNo, new CableTVService(), true);
			
		}
		return panel;
	}
	
	@Override
	public JPanel createActionButtonsPanel() {

		return null;
	}

}
